<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="java.sql.*"%>
<%@ page import="com.xpert.common.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Model 1 board</title>
<link rel="stylesheet" type="text/css" href="/zmodel2/css/style.css" />
<script type="text/javascript">
	function formCheck() {
		var content = document.forms[0].content.value;
		if(content == "" || content == null) {
			alert("내용을 입력하셔야 합니다.");
			
			return false;
		}
	}
</script>
</head>
<body>
	<h1>Free Board</h1>
	<div id="board">
		<form action="modify_proc.do?idx=${article.idx}&page=${page}" method="post" onsubmit="return formCheck()">
		<table>
			<tr>
				<th>번호</th>
				<td>${article.idx}</td>
				<th>작성자</th>
				<td>${article.writer}</td>
				<th>날짜</th>
				<td>${article.regdate}</td>
				<th>조회수</th>
				<td>${article.count}</td>
			</tr>
			<tr>
				<th colspan="2">제목</th>
				<td colspan="6">${article.title}</td>
				</tr>
				<tr>
				<th colspan="2">내용</th>
				<td colspan="6" class="content">
						<textarea rows="16" cols="100%" name="content">${article.content}</textarea>
				</td>
			</tr>
		</table>
		<input type="submit" value="확인" />&nbsp;
		<input type="button" value="취소" onclick="javascript:history.back();" />
		</form>
	</div>
</body>
</html>